package com.szsfm.vehiclemanagement.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by zhoubigbo on 2017/11/21.
 */
@Entity
public class Message {

    @Id(autoincrement = true)
    private long id;

    @Property(nameInDb = "type")
    private int type;

    @Property(nameInDb = "title")
    private String title;

    @Property(nameInDb = "message")
    private String message;

    @Property(nameInDb = "timestamp")
    private String subTimestamp;
    @Property(nameInDb = "msgId")
    private long msgId;

    @Property(nameInDb = "isRead")
    private boolean isRead;

    public boolean isRead() {
        return isRead;
    }

    public void setRead(boolean read) {
        isRead = read;
    }

    public Message() {

    }


    public Message(String title, String message) {
        this.title = title;
        this.message = message;
    }


    @Generated(hash = 596871631)
    public Message(long id, int type, String title, String message, String subTimestamp, long msgId, boolean isRead) {
        this.id = id;
        this.type = type;
        this.title = title;
        this.message = message;
        this.subTimestamp = subTimestamp;
        this.msgId = msgId;
        this.isRead = isRead;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getSubTimestamp() {
        return subTimestamp;
    }

    public void setSubTimestamp(String subTimestamp) {
        this.subTimestamp = subTimestamp;
    }

    public long getMsgId() {
        return msgId;
    }

    public void setMsgId(long msgId) {
        this.msgId = msgId;
    }


    public long getId() {
        return this.id;
    }


    public void setId(long id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Message{" + "id=" + id + ", type=" + type + ", title='" + title + '\'' + ", message='" + message + '\'' + ", subTimestamp='" + subTimestamp + '\'' + ", msgId=" + msgId + '}';
    }

    public boolean getIsRead() {
        return this.isRead;
    }

    public void setIsRead(boolean isRead) {
        this.isRead = isRead;
    }
}
